* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.iconfont {
    font-size: 26px !important;
    color: #fff;
    line-height: 50px;
    text-align: center;
}

.menu-box {
    width: 60px;
    height: 400px;
    background-color: #22243a;
    border-radius: 30px;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, .3);
    /* 添加过渡 */
    transition: all .2s ease-out;
    overflow: hidden;
}


.menu-box:hover {
    width: 120px;
    border-radius: 60px;
}

/* hover时让文字出现 */
.menu-box:hover>ul>li p {
    display: block;
}

/* 表情盒子 */
.emotion-box {
    width: 100%;
    text-align: center;
    margin: 10px auto;
}

#emotion1,
#emotion2 {
    color: #fff;
    font-size: 32px !important;
    animation: jitter .3s linear forwards;
}

#emotion2 {
    display: none;
}

.menu-box:hover #emotion1 {
    display: none;
}

.menu-box:hover #emotion2 {
    display: block;
}

ul {
    width: 100%;
    height: 75%;
}

li {
    list-style: none;
}

li>a {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 20%;
    text-decoration: none;
    /* 禁止用户选中 */
    user-select: none;
}

li:hover {
    background-color: #343850;
    cursor: pointer;
}

li:hover .content,
li:hover i {
    color: #fff;
}

li:hover i {
    animation: jitter .3s linear forwards;
}

.content {
    display: none;
    padding-left: 5px;
    color: #fff;
    /* 设置文字不换行 */
    white-space: nowrap;
    transition: all .2s ease-out;
}

/* 抖动动画 */
@keyframes jitter {
    0% {
        /* 缩放1.2倍，顺时针旋转10° */
        transform: scale(1.2) rotate(10deg);
    }

    50% {
        transform: scale(0.8) rotate(-10deg);
    }

    0% {
        transform: scale(1.0) rotate(0deg);
    }
}